@mixin component-size($padding-y, $padding-x, $font-size, $border-radius) {
  padding: $padding-y $padding-x;
  font-size: $font-size;
  border-radius: $border-radius;
}

@mixin button-style(
  $background,
  $border,
  $color,
  $hover-background: lighten($background, 7.5%),
  $hover-border: lighten($border, 10%),
  $hover-color: $color
){
  color: $color;
  background: $background;
  border-color: $border;
  &:hover{
    color: $hover-color;
    background: $hover-background;
    border-color: $hover-border;
  }
  // 使 disabled 的颜色不因 hover 而改变
  &:disabled,
  &.disabled {
    color: $color;
    background: $background;
    border-color: $border;
  }
}

@mixin alert-style(
  $background,
  $color,
  $border:darken($background, 7.5%)
){
  color: $color;
  background: $background;
  border-color: $border;
}

@mixin zoom-animation(
  $direction,
  $scaleStart,
  $scaleEnd,
  $originX,
  $originY,
){
  $appearances: 'appear', 'enter';
  @each $appearance in $appearances{
    .zoom-in-#{$direction}-#{$appearance}{
      opacity: 0;
      transform: $scaleStart;
    }
    .zoom-in-#{$direction}-#{$appearance}-active{
      opacity: 1;
      transform: $scaleEnd;
      transform-origin: $originX $originY;
      transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms,
      transform 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms;
    }
  }

  .zoom-in-#{$direction}-exit{
    opacity: 1;
  }
  .zoom-in-#{$direction}-exit-active{
    opacity: 0;
    transform: $scaleStart;
    transform-origin: $originX $originY;
    transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms,
    transform 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms;
  }
}

@mixin border-left-radius($radius){
  border-top-left-radius: $radius;
  border-bottom-left-radius: $radius;
}

@mixin border-right-radius($radius){
  border-top-right-radius: $radius;
  border-bottom-right-radius: $radius;
}


@mixin uploadFile-name-color($color) {
  color: $color
}